/**
 * <copyright>
 * Copyrigth 2007 Aurelien Moreau
 *
 * This file is part of ProcessShop.
 *
 * ProcessShop is free software; you can redistribute it and/or modify
 * it under the terms of the GNU Lesser General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 * 
 * ProcessShop is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU Lesser General Public License for more details.
 * 
 * You should have received a copy of the GNU Lesser General Public License
 * along with ProcessShop; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 * </copyright>
 *
 * $Id$
 */
package net.yienyien.process.folder.stdPatterns.impl;

import net.yienyien.process.folder.stdPatterns.*;
import net.yienyien.process.folder.stdPatterns.Flow;
import net.yienyien.process.folder.stdPatterns.Other;
import net.yienyien.process.folder.stdPatterns.Pick;
import net.yienyien.process.folder.stdPatterns.Repeat;
import net.yienyien.process.folder.stdPatterns.RepeatWhile;
import net.yienyien.process.folder.stdPatterns.Sequence;
import net.yienyien.process.folder.stdPatterns.StdPatternsFactory;
import net.yienyien.process.folder.stdPatterns.StdPatternsPackage;
import net.yienyien.process.folder.stdPatterns.Switch;
import net.yienyien.process.folder.stdPatterns.SynchronizingProcess;
import net.yienyien.process.folder.stdPatterns.While;

import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.EPackage;
import org.eclipse.emf.ecore.impl.EFactoryImpl;
import org.eclipse.emf.ecore.plugin.EcorePlugin;

/**
 * <!-- begin-user-doc -->
 * An implementation of the model <b>Factory</b>.
 * <!-- end-user-doc -->
 * @generated
 */
public class StdPatternsFactoryImpl extends EFactoryImpl implements StdPatternsFactory {
	
	/**
	 * Creates the default factory implementation.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated NOT
	 */
	public static StdPatternsFactory init() {
		try {
			StdPatternsFactoryImpl theStdPatternsFactory = (StdPatternsFactoryImpl)EPackage.Registry.INSTANCE.getEFactory("http://www.yienyien.net/process/folder/stdPatterns"); 
			if (theStdPatternsFactory != null) {				
				return theStdPatternsFactory;
			}
		}
		catch (Exception exception) {
			EcorePlugin.INSTANCE.log(exception);
		}
				
		return new StdPatternsFactoryImpl();
	}
	
	/**
	 * Creates an instance of the factory.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public StdPatternsFactoryImpl() {
		super();
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public EObject create(EClass eClass) {
		switch (eClass.getClassifierID()) {
			case StdPatternsPackage.FLOW: return createFlow();
			case StdPatternsPackage.OTHER: return createOther();
			case StdPatternsPackage.PICK: return createPick();
			case StdPatternsPackage.REPEAT: return createRepeat();
			case StdPatternsPackage.REPEAT_WHILE: return createRepeatWhile();
			case StdPatternsPackage.SEQUENCE: return createSequence();
			case StdPatternsPackage.SWITCH: return createSwitch();
			case StdPatternsPackage.SYNCHRONIZING_PROCESS: return createSynchronizingProcess();
			case StdPatternsPackage.WHILE: return createWhile();
			default:
				throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier");
		}
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public Flow createFlow() {
		FlowImpl flow = new FlowImpl();
		return flow;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public Other createOther() {
		OtherImpl other = new OtherImpl();
		return other;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public Pick createPick() {
		PickImpl pick = new PickImpl();
		return pick;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public Repeat createRepeat() {
		RepeatImpl repeat = new RepeatImpl();
		return repeat;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public RepeatWhile createRepeatWhile() {
		RepeatWhileImpl repeatWhile = new RepeatWhileImpl();
		return repeatWhile;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public Sequence createSequence() {
		SequenceImpl sequence = new SequenceImpl();
		return sequence;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public Switch createSwitch() {
		SwitchImpl switch_ = new SwitchImpl();
		return switch_;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public SynchronizingProcess createSynchronizingProcess() {
		SynchronizingProcessImpl synchronizingProcess = new SynchronizingProcessImpl();
		return synchronizingProcess;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public While createWhile() {
		WhileImpl while_ = new WhileImpl();
		return while_;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public StdPatternsPackage getStdPatternsPackage() {
		return (StdPatternsPackage)getEPackage();
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @deprecated
	 * @generated
	 */
	@Deprecated
	public static StdPatternsPackage getPackage() {
		return StdPatternsPackage.eINSTANCE;
	}

} //StdPatternsFactoryImpl
